package com.onlyyou.stock.entity;

import com.onlyyou.stock.info.StockInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author: 小野
 * @Date: 2020/1/13 11:33
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Stock {
    private Long id;
    private Long spuId;
    private String title;
    private String images;
    private Integer stock;
    private Long price;
    private String indexes;
    private String ownSpec;
    private Byte enable;
    private Date createTime;
    private Date updateTime;
    public StockInfo buildInfo() {
        StockInfo stockInfo=new StockInfo();
        BeanUtils.copyProperties(this,stockInfo);
        return stockInfo;
    }
}
